package com.ndphu.comic.gui.list.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;

import com.ndphu.comic.R;

public class ChapterAdapter extends SlidingMenuAdatper {

	public ChapterAdapter(Context context, int textViewResourceId) {
		super(context, textViewResourceId);
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		View view = super.getView(position, convertView, parent);
		ViewHolder holder = (ViewHolder)view.getTag();
		holder.icon.setVisibility(View.GONE);
		holder.textView.setPadding(10, 0, 0, 0);
		holder.textView.setTextSize(16f);
		if (position == mSelectedIdx) {
			view.setBackgroundResource(R.drawable.listitem_background_selected_shadow);
			holder.textView.setTextColor(mResources.getColor(android.R.color.white));
		} else {
			view.setBackgroundResource(R.drawable.listitem_background_normal_shadow);
			holder.textView.setTextColor(mResources.getColor(android.R.color.black));
		}
		return view;
	}

}
